Jump to content
  • 0

pomoc /port


mara5572

Dotaz

Dobrý den.

Jsem začátečník s pawnem a mám problém v tomto scriptu nebo jak to nazvat.

Byl bych vám vděčen kdyby jste mi někdo pomohl.

 

Problém: error 030: compound statement not closed at the end of file (started at line 6)

 

Script:

#include <a_samp>
 
new bool:PortSwtich,Float:locx,Float:locy,Float:locz;
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(strcmp(cmdtext,"/port",true) == 0)
{
   if(PortSwtich == false) SendClientMessage(playerid,0xfffffffff,"[ ! ] Port je vypnutý!");
   else
   {
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,46,1);
SetPlayerPos(playerid,locx,locy,locz);
}
return 1;
}
if(IsPlayerAdmin(playerid))
{
if(strcmp(cmdtext,"/setport",true) == 0)
{
GetPlayerPos(playerid,locx,locy,locz);
SendClientMessage(playerid,0xfffffffff,"[ ! ] Uložil jsi /port");
return 1;
}
if(strcmp("/portoff",cmdtext,true,10) == 0)
{
   PortSwtich = false;
SendClientMessage(playerid,0xfffffffff,"[ ! ]Vypnul jsi /port");
return 1;
}
if(strcmp("/porton",cmdtext,true,10) == 0)
{
   PortSwtich = true;
 
SendClientMessage(playerid,0xfffffffff,"[ ! ]Zapnul jsi /port /*[POZOR!: Pokud vypnes a zapnes /port,musíš ho uložit znovu!] - uz neplati*/");
return 1;
}
}
return 0;
 
 
 
 
 
 
Děkuji.
 
Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

#include <a_samp>

new bool:PortSwtich,Float:locx,Float:locy,Float:locz;
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/port",true) == 0)
{
if(PortSwtich == false) SendClientMessage(playerid,0xfffffffff,"[ ! ] Port je vypnutý!");
else
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,46,1);
SetPlayerPos(playerid,locx,locy,locz);
}
return 1;
}
if(IsPlayerAdmin(playerid))
{
if(strcmp(cmdtext,"/setport",true) == 0)
{
GetPlayerPos(playerid,locx,locy,locz);
SendClientMessage(playerid,0xfffffffff,"[ ! ] Uložil jsi /port");
return 1;
}
if(strcmp("/portoff",cmdtext,true,10) == 0)
{
PortSwtich = false;
SendClientMessage(playerid,0xfffffffff,"[ ! ]Vypnul jsi /port");
return 1;
}
if(strcmp("/porton",cmdtext,true,10) == 0)
{
PortSwtich = true;
SendClientMessage(playerid,0xfffffffff,"[ ! ]Zapnul jsi /port /*[POZOR!: Pokud vypnes a zapnes /port,musíš ho uložit znovu!] - uz neplati*/");
return 1;
}
}
return 0;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...