Please help. this is weird - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please help. this is weird (
/showthread.php?tid=126385)
Please help. this is weird -
bartje01 - 08.02.2010
Ok guys. This problem is fixed. I noticed that when you just try you can do it your self many times.
Thats what I had.
It costed me some time to fix this problem but I did it.
thanks for not saying anything this time :P I like it when I can fix such problems my self.
Regards
Re: Please help. this is weird -
mansonh - 08.02.2010
Your not showing your whole code here, you haven't even included your usage message.
Post all the code for quicker help.
Re: Please help. this is weird -
bartje01 - 08.02.2010
Ow sry.
Well. This is the whole cmd
Код:
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/givepermission", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /givepermission [playerid]");
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "Done!");
SkinPermission[giveplayerid] = true;
}
else if (!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: Player not Conected!");
}
}
else
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: You are not an Administrator!");
}
return 1;
Re: Please help. this is weird -
bartje01 - 08.02.2010
Ok I fixed somethign now. The problem I have now is this:
When I do /giveperm [id] it just says USAGE:blablabla.
And it doesn't say: done and I don'thave the permission.
What do I have to edit in this script?
Код:
if(strcmp(cmd,"/giveperm", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(!strlen(tmp))
return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /giveperm [playerid]");
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "Done!");
SkinPermission[giveplayerid] = true;
}
else if (!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: Player not Conected!");
}
}
else
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: You are not an Administrator!");
}
return 1;
Re: Please help. this is weird -
mansonh - 11.02.2010
pawn Код:
if(strcmp(cmd,"/giveperm", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /giveperm [playerid]");
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "Done!");
SkinPermission[giveplayerid] = true;
}
else if (!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: Player not Conected!");
}
}
else
{
SendClientMessage(playerid, 0xE3E3E3FF, "ERROR: You are not an Administrator!");
}
return 1;