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.