command(vampirebite, playerid, params[]) { if(gTeam(pID)); == RACE_VAMPIRES)) return SendClientMessage(playerid, 0xAFAFAFAA, "You need to be a vampire to use this command"); if sscanf(params, "ui", pID, tID) return SendClientMessage(playerid, 0xAFAFAFAA, "Usage : /vampirebite [playerid/name]"); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, 0xAFAFAFAA, "That player is currently not connected."); return SendClientMessage(playerid, 0xAFAFAFAA, "You've been bitten by %s"); }
I'm currently in need of help finishing this snippet, I'm not sure if I am doing it right at all, feel free to help! Thanks.
Код:
command(vampirebite, playerid, params[]) { if(gTeam(playerid)); == RACE_VAMPIRES)) return SendClientMessage(playerid, 0xAFAFAFAA, "You need to be a vampire to use this command"); if sscanf(params, "ui", pID, tID)) return SendClientMessage(playerid, 0xAFAFAFAA, "Usage : /vampirebite [playerid/name]"); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, 0xAFAFAFAA, "That player is currently not connected."); return SendClientMessage(playerid, 0xAFAFAFAA, "You've been bitten"); } |
D:\SAMP Server\gamemodes\Vampires.pwn(181) : error 017: undefined symbol "gTeam" D:\SAMP Server\gamemodes\Vampires.pwn(181) : error 036: empty statement D:\SAMP Server\gamemodes\Vampires.pwn(181) : error 029: invalid expression, assumed zero D:\SAMP Server\gamemodes\Vampires.pwn(181) : fatal error 107: too many error messages on one line
CMD:vampirebite(playerid, params[]) {
if(gTeam(playerid) != RACE_VAMPIRES) return SendClientMessage(playerid, 0xAFAFAFAA, "You need to be a vampire to use this command"); // Checks if the team is RACE_VAMPIRES. If not, it returns the message that you have to be one.
new pID; // Self-explanatory
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, 0xAFAFAFAA, "Usage : /vampirebite [playerid/name]");
if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xAFAFAFAA, "That player is currently not connected."); // Checks whether the ID is valid/connected
return SendClientMessage(pID, 0xAFAFAFAA, "You've been bitten"); //After all the checks are done, sends this message if they all are passed.
}