need some help - 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: need some help (
/showthread.php?tid=167917)
need some help -
OmarEco - 14.08.2010
all know this
Code:
AdminLvl[playerid] = 0;
i want to us it by command like
Code:
if (!strcmp("/blabal", cmdtext))
{
SendClientMessage(playerid, 0xFFFFFFFF, "test");
SendClientMessage(playerid, 0xFFFFFFFF, "test");
}
return 1;
i want use i
Code:
AdminLvl[playerid] = 0;
in this and set it to 1 when he use command frist time and send message when he use command again and AdminLvl[playerid] = 0; seted to 1 how this
Re: need some help -
Arrows73 - 14.08.2010
I dont understand your post completely, but do you want to do something like this?
Code:
if (!strcmp("/admin", cmdtext))
{
if (AdminLvl[playerid])
{
AdminLvl[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin anymore");
}
else
{
AdminLvl[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "You are an admin now");
}
return 1;
}
Re: need some help -
OmarEco - 14.08.2010
you know line AdminLvl[playerid] = 0;
i want change 0 to 1
Re: need some help -
OmarEco - 14.08.2010
i do this command
Code:
if (!strcmp("/repair", cmdtext))
{
{
if(command== 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
}
if(command== 1)
{
SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
}
}
and need under line SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle"); set command 0 to command 1
Re: need some help -
billiout - 14.08.2010
Code:
//on the top of your script
new command[MAX_PLAYERS];
//on OnPlayerCommandText
if (!strcmp("/repair", cmdtext))
{
{
if(command[playerid] == 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
command[playerid] = 1;
}
if(command[playerid] == 1)
{
SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
}
}
Re: need some help -
OmarEco - 14.08.2010
E:\
www.mini-ex-missions.tk\sumo.pwn(96) : error 028: invalid subscript (not an array or too many subscripts): "command"
E:\
www.mini-ex-missions.tk\sumo.pwn(96) : warning 215: expression has no effect
E:\
www.mini-ex-missions.tk\sumo.pwn(96) : error 001: expected token: ";", but found "]"
E:\
www.mini-ex-missions.tk\sumo.pwn(96) : error 029: invalid expression, assumed zero
E:\
www.mini-ex-missions.tk\sumo.pwn(96) : fatal error 107: too many error messages on one line
Re: need some help -
Claude - 14.08.2010
pawn Code:
new command[MAX_PLAYERS];
if (!strcmp("/repair", cmdtext))
{
if(command[playerid] == 1) return SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
command[playerid] = 1;
return 1;
}
Re: need some help -
OmarEco - 14.08.2010
oh repaired i get the error its new command[MAX_PLAYERS];
Re: need some help -
OmarEco - 14.08.2010
how i repair this Warnings
Code:
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(80) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(84) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(86) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(117) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(117) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(225) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(292) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
7 Warnings.
lines
Code:
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
SetPlayerName(playerid,"%s_servers",plname);
SendClientMessage(playerid,0x33FF33AA,"[Server] If You want to make a map please visit %s",ForumName);
SendClientMessageToAll(0xAFAFAFAA,"[Server] Player %s Has joined the game",plname);
RemovePlayerFromGame();
SendClientMessageToAll(0x33CCFFAA,"[Server] Player %s Has Left The server", name);
GameTextForAll("%s has won the round! Next round will be starting in 10 seconds.",5000,50, name);
Re: need some help -
Claude - 14.08.2010
Use "format" find it on the wiki